<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<div th:fragment="master_comment" style="width: 100%;">
    <p>
        <img th:src="${comment.userImg}" style="width: 0.6rem;margin-left: 0.2rem;border-radius: 0.1rem;">
        <span th:text="${comment.username}" style="font-size: 0.3rem;margin-left: 0.1rem;"></span>
    </p>
    <p th:text="${comment.comment.comment}" style="margin-left: 0.8rem;font-size: 0.35rem;margin-top: -0.2rem;"></p>
    <p th:text="${comment.date}" style="font-size: 0.2rem;color: gray;margin-left: 0.8rem;margin-top: -0.2rem;">
    <hr class="pro_hr">
    <div th:each="recomment : ${comment.getCommentObjs()}"
         th:include="app_product/product_comment::re_comment(recomment = recomment)"
         th:onclick="show_add_comment([[${recomment.userId}]],[[${recomment.username}]],event,[[${recomment.comment.id}]]);return false;"></div>
</div>

<div th:fragment="re_comment" style="width: 100%;">
    <p>
        <img th:src="${recomment.userImg}" style="width: 0.6rem;margin-left: 0.8rem;border-radius: 0.1rem;">
        <span th:text="${recomment.username}" style="font-size: 0.3rem;margin-left: 0.1rem;"></span>
    </p>
    <p th:text="${'回复@'+recomment.reUsername+': '+recomment.comment.comment}"
       style="margin-left: 1.4rem;font-size: 0.35rem;margin-top: -0.2rem;"></p>
    <p th:text="${recomment.date}" style="font-size: 0.2rem;color: gray;margin-left: 1.4rem;margin-top: -0.2rem;">
    <hr class="pro_hr" style="margin-left: 0.6rem;">
    <div th:if="${not #lists.isEmpty(recomment.getCommentObjs())}">
        <div th:each="rerecomment : ${recomment.getCommentObjs()}"
             th:include="app_product/product_comment::rere_comment(rerecomment = rerecomment)"
             th:onclick="show_add_comment([[${rerecomment.userId}]],[[${rerecomment.username}]],event,[[${rerecomment.comment.id}]]);return false;"></div>
    </div>
</div>
</div>

<div th:fragment="rere_comment" style="width: 100%;">
    <p>
        <img th:src="${rerecomment.userImg}" style="width: 0.6rem;margin-left: 0.8rem;border-radius: 0.1rem;">
        <span th:text="${rerecomment.username}" style="font-size: 0.3rem;margin-left: 0.1rem;"></span>
    </p>
    <p th:text="${'回复@'+rerecomment.reUsername+': '+rerecomment.comment.comment}"
       style="margin-left: 1.4rem;font-size: 0.35rem;margin-top: -0.2rem;"></p>
    <p th:text="${recomment.date}" style="font-size: 0.2rem;color: gray;margin-left: 1.4rem;margin-top: -0.2rem;">
    <hr class="pro_hr" style="margin-left: 0.6rem;">
    <div th:if="${not #lists.isEmpty(rerecomment.getCommentObjs())}">
        <div th:each="recomment : ${rerecomment.getCommentObjs()}"
             th:include="app_product/product_comment::re_comment(recomment = recomment)"
             th:onclick="show_add_comment([[${recomment.userId}]],[[${recomment.username}]],event,[[${recomment.comment.id}]]);return false;"></div>
    </div>
</div>
</div>
